﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Photos
{
    public partial class Delete : ModuleCompanyBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request["id"]);

            var photo = from p in DB.cp_Photos
                        where p.id == id
                        select p;

            DB.cp_Photos.DeleteAllOnSubmit(photo);
            DB.SubmitChanges();
            
        }
    }
}